IdeaBlade DevForce 2010 Help Reference
PendingEntityListResolved Event
See Also  Example Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > RelatedEntityList<T> Class : PendingEntityListResolved Event



Event fired when an asynchronous navigation completes.

Syntax

Visual Basic (Declaration) 
Public Event PendingEntityListResolved As EventHandler(Of PendingEntityListResolvedEventArgs(Of T))
Visual Basic (Usage)Copy Code
Dim instance As RelatedEntityList(Of T)
Dim handler As EventHandler(Of PendingEntityListResolvedEventArgs(Of T))
 
AddHandler instance.PendingEntityListResolved, handler
C# 
public event EventHandler<PendingEntityListResolvedEventArgs<T>> PendingEntityListResolved
C++/CLI 
public:
event EventHandler<PendingEntityListResolvedEventArgs<T^>^>^ PendingEntityListResolved

Event Data

The event handler receives an argument of type PendingEntityListResolvedEventArgs<T> containing data related to this event. The following PendingEntityListResolvedEventArgs<T> properties provide information specific to this event.

PropertyDescription
ResolvedEntities The entities fetched by the asynchronous navigation.

Example

C#Copy Code
private Customer _aCustomer;

public void GetCustOrdersAsync() {

  DomainModelEntityManager mgr = = new DomainModelEntityManager();

  // Turn on async navigation.  This is a readonly property in Silverlight.
  mgr.UseAsyncNavigation = true;

  // Assume we already have a Customer instance. 
  // Navigate to customer orders.  
  // If UseAsyncNavigation is true and the orders aren't already in cache
  // the IsPendingEntityList flag will be on.

  var orders = _aCustomer.OrderSummaries;
  Assert.IsTrue(orders.IsPendingEntityList);

  // Setup a handler to be called when data is returned.
 orders.PendingEntityListResolved += PendingOrdersResolvedHandler;
}

private void PendingOrdersResolvedHandler(object sender, PendingEntityListResolvedEventArgs<OrderSummary> args) {
  // The original RelatedEntityList will now contain the returned entities, as will the 
  // args.ResolvedEntities list.

  Assert.IsFalse(_customer.OrderSummaries.IsPendingEntityList);
  Assert.IsTrue(_customer.OrderSummaries.Count > 0);
}

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.